import http from "@/http/http.js";

export function getCityAll() {
    return http("get", "v1/cities?type=group")
}
export function gethotCity() {
    return http("get", "v1/cities?type=hot")
}
export function getdq() {
    return http("get", "v1/cities?type=guess")
}
export function getseach(id, msg) {
    return http("get", "v1/pois?type=search&city_id=" +
        id +
        "&keyword=" +
        msg + "")
}
export function getseachhistory() {
    return http("get", "v2/index_entry?geohash=31.239585,121.323628&group_type=1&flags[]=F")
}
//美食数据接口
export function getseachhistorypage(arr) {
    return http("get", "shopping/restaurants?latitude=" + arr[0] + "&longitude=" + arr[1] + "&offset=" + arr[2] + "&limit=" + arr[3] + "&extras[]=activities&keyword=&restaurant_category_id=&restaurant_category_ids[]=&order_by=&delivery_mode[]=")
}
//分类接口
export function getHistoryclassfiy(latitude, longitude) {
    return http("get", "shopping/v2/restaurant/category?latitude=" + latitude + "&longitude=" + longitude + "")
}
//蜂鸟专送接口
export function getHistorymango(latitude, longitude) {
    return http("get", "shopping/v1/restaurants/delivery_modes?latitude=" + latitude + "&longitude=" + longitude + "&kw=")
}
//商家属性接口
export function getHistorysoop() {
    return http("get", "shopping/v1/restaurants/activity_attributes?latitude=47.368057&longitude=123.948265&kw=")
}
//详情美食数据接口
export function getseachxqhistorypage(latitude, longitude, id) {
    return http('get', 'shopping/restaurants?latitude=' + latitude + '&longitude=' + latitude + '&offset=0&limit=20&extras[]=activities&keyword=&restaurant_category_id=&restaurant_category_ids[]=' + id + '&order_by=null&delivery_mode[]=null')
}
export function getseachxqhistorypage1(latitude, longitude, id) {
    return http('get', 'shopping/restaurants?latitude=' + latitude + '&longitude=' + latitude + '&offset=0&limit=20&extras[]=activities&keyword=&restaurant_category_id=&restaurant_category_ids[]=' + id + '&order_by=null&delivery_mode[]=null')
}
//排序接口
export function getseachhistor(id) {
    return http('get', 'shopping/restaurants?latitude=47.368057&longitude=123.948265&offset=0&limit=20&extras[]=activities&keyword=&restaurant_category_id=&restaurant_category_ids[]=&order_by=' + id + '&delivery_mode[]=null')
}
//筛选接口
export function getseachhistoryfifter(id, fn) {
    return http('get', 'shopping/restaurants?latitude=47.368057&longitude=123.948265&offset=0&limit=20&extras[]=activities&keyword=&restaurant_category_id=&restaurant_category_ids[]=&order_by=null&delivery_mode[]=' + fn + '' + id + '')
}
//订单详情接口
export function getddxqapi(id) {
    return http('get', 'shopping/v2/menu?restaurant_id=' + id + '')
}
//验证码接口数据
export function getcode() {
    return http('post', 'v1/captchas')
}
//通过数据获取登录信息接口数据
export function getstatus(data) {
    return http('post', 'v2/login', data)
}
//修改密码接口
export function changepassword(data) {
    return http('post', 'v2/changepassword', data)
}
//修改头像接口
export function getaleat(data) {
    return http('post', 'eus/v1/users/65434/avatar', data)
}

